<!DOCTYPE html>
<html>
<head>
    <title></title>
    <meta charset="UTF-8">
    <link rel="stylesheet" type="text/css" href="__PUBLIC__/Css/bootstrap.css"/>
    <link rel="stylesheet" type="text/css" href="__PUBLIC__/Css/bootstrap-responsive.css"/>
    <link rel="stylesheet" type="text/css" href="__PUBLIC__/Css/style.css"/>
    <script type="text/javascript" src="__PUBLIC__/Js/jquery.js"></script>
    <script type="text/javascript" src="__PUBLIC__/Js/jquery.sorted.js"></script>
    <script type="text/javascript" src="__PUBLIC__/Js/bootstrap.js"></script>
    <script type="text/javascript" src="__PUBLIC__/Js/ckform.js"></script>
    <script type="text/javascript" src="__PUBLIC__/Js/common.js"></script>

    <style type="text/css">
        body {
            padding-bottom: 40px;
        }

        .sidebar-nav {
            padding: 9px 0;
        }

        @media (max-width: 980px) {
            /* Enable use of floated navbar text */
            .navbar-text.pull-right {
                float: none;
                padding-left: 5px;
                padding-right: 5px;
            }
        }

    </style>
</head>
<body>
<div class="navbar definewidth m10">
    <div class="navbar-inner">
        <a class="brand">网站信息</a>
        <button style="float:right;" type="button" class="btn btn-success" onclick="javasript:add()">添加信息</button>
    </div>
</div>

<div>
    <form action="{:U('Admin/NewsClass/DelallOrSort')}">
        <table class="table table-bordered table-hover definewidth m10" classid="class_1">
            <thead>
            <tr>
                <th width="7%">序号</th>
                <th width="10%">英文名称</th>
                <th width="10%" colspan="2">名称</th>
                <th width="40%">内容</th>
                <th>操作</th>
            </tr>
            </thead>
            <volist name="list" id="vo">
                <tr>
                    <td>{$vo.id}</td>
                    <td >{$vo.name}</td>
                    <td colspan="2">{$vo.title}</td>
                    <td>{$vo.content}</td>
                    <td>
                        <div class="btn-group">
                            <button type="button" class="btn btn-mini btn-info" onclick="javasript:edit({$vo.id})">编辑
                            </button>
                            <button type="button" class="btn btn-mini btn-danger" onclick="javasript:del({$vo.id})">删除
                            </button>
                        </div>
                    </td>
                </tr>
            </volist>
        </table>
    </form>


</div>
</body>
</html>
<script language="JavaScript" type="text/javascript">
    $(document).ready(function () {

        $('#addnew').click(function () {

            window.location.href = "{$addurl}";
        });
    });
    function add() {
        window.location.href = "{$addurl}";
    }

    function edit(id) {
        window.location.href = "{$editurl}?id=" + id;
    }
    function del(id) {
        if (confirm("确定要删除吗?")) {
            window.location.href = "{$delurl}?id=" + id;
        }
    }
</script>